package cn.main.dao;

import org.hibernate.Session;

import java.util.List;
import java.util.Map;

/**
 * Author: chengwei
 * Date:   2016/5/20
 * Time:   9:46
 */
public interface BaseDao {
    
    Session getCurrentSession();
    
    Map<String,Object> queryForMap(String sql,Object... args);
    
    List<Map<String,Object>> queryForList(String sql,Object...args);
    
    int execute(String sql,Object...args);
    
    int insert(String tableName,Map<String,Object> map);

    int[] executeBatch(String sql,List<Object[]> argsList);
    
}
